import request from '@/utils/request'

export default {
  // 列表
  query(data) {
    return request({
      url: `/v1/product/product-special-purchase/list`,
      method: 'post',
      data
    })
  },
  // 添加
  create(data) {
    return request({
      url: `/v1/product/product-special-purchase/create`,
      method: 'post',
      data
    })
  },
  // 编辑
  edit(data) {
    return request({
      url: `/v1/product/product-special-purchase/edit`,
      method: 'post',
      data
    })
  },
  // 预览
  detail(params) {
    return request({
      url: `/v1/product/product-special-purchase/detail`,
      method: 'get',
      params
    })
  },
  // 保存
  save(data) {
    return request({
      url: `/v1/product/product-special-purchase/save`,
      method: 'post',
      data
    })
  },
  // 提交
  submit(data) {
    return request({
      url: `/v1/product/product-special-purchase/submit`,
      method: 'post',
      data
    })
  },
  // 反审
  back(data) {
    return request({
      url: `/v1/product/product-special-purchase/back`,
      method: 'post',
      data
    })
  },
  // 作废
  cancel(data) {
    return request({
      url: `/v1/product/product-special-purchase/cancel`,
      method: 'post',
      data
    })
  },
  // 计划确认
  confirm(data) {
    return request({
      url: `/v1/product/product-special-purchase/confirm`,
      method: 'post',
      data
    })
  },
  // 批量审核
  batchAudit(data) {
    return request({
      url: `/v1/product/product-special-purchase/batch-audit`,
      method: 'post',
      data
    })
  },
  // 生成备库需求
  demand(data) {
    return request({
      url: `/v1/product/product-special-purchase/demand`,
      method: 'post',
      data,
      returnData: true
    })
  },
}
